package com.edu.test;

import com.edu.bean.MyDataSource;
import com.edu.bean.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTet {
    @Test
    public void text() {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("Spring-ioc.xml");
        User user = context.getBean(User.class);
        user.sayHi();
        context.close();
    }
    @Test
    public void test01(){
        ApplicationContext context = new ClassPathXmlApplicationContext("Spring-ioc02.xml");
        MyDataSource dataSource = context.getBean(MyDataSource.class);
        System.out.println(dataSource);
    }


}
